/**
 * @author 赵希奥
 * @date 2022/4/20 17:17
 * @gitHub https://github.com/CKXGZXA
 * @gitee https://gitee.com/ckxgzxa
 * @description:
 */
public class AndNode implements Node {
    private Node left;
    private Node right;

    public AndNode(Node left, Node right) {
        this.left = left;
        this.right = right;
    }

    @Override
    public int interpret() {
        if (left.interpret() == 1 && right.interpret() == 1) {
            return 1;
        } else {
            return 0;
        }
    }
}
